﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='configList'/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="col-xs-12">
                    <div class="row-fluid">
                        <div class="widget-box">
                            <div class="widget-header widget-header-blue widget-header-flat">
                                <h4 class="lighter">
                                    <i class="icon-edit"></i>修改商品
                                </h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    <div class="step-content row-fluid position-relative">
                                        <form class="form-horizontal" action="/goods/update" method="post"
                                              enctype="multipart/form-data">
                                            <input type="hidden" name="id" value="${goods.id}">
                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">商品名</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" required name="name"
                                                           value="${goods.name}"/>
                                                </div>
                                            </div>
                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">商品编号</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" required name="no"
                                                           value="${goods.no}"/>
                                                </div>
                                            </div>
                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">类别</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <select  class="width-100" name="category">
                                                        <option value="家电">家电</option>
                                                        <option value="食品" <#if '食品' == goods.category!>selected</#if> >食品</option>
                                                        <option value="日用百货" <#if '日用百货' == goods.category!>selected</#if>>日用百货</option>
                                                        <option value="其他" <#if '其他' == goods.category!>selected</#if>>其他</option>
                                                    </select>

                                                </div>
                                            </div>

                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">所属店铺</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <select name="userid" class="width-100">
                                                        <#list shopList as item>
                                                            <option <#if item.id == goods.shopid>selected</#if>
                                                                    value="${item.id}">${item.name!}</option>
                                                        </#list>
                                                    </select>
                                                </div>
                                            </div>

                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">上传图片</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="file" class="width-100" required name="file"/>
                                                </div>
                                            </div>

                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">进价</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="number" class="width-100" required name="price" value="${goods.price!}"/>
                                                </div>
                                            </div>

                                            <div class="form-group has-goods">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">售价</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="number" class="width-100" required name="money" value="${goods.money!}"/>
                                                </div>
                                            </div>
                                            <hr/>
                                            <div class="row-fluid wizard-actions">
                                                <button class="btn" type="reset">重置</button>
                                                <button class="btn btn-success" type="submit">提交</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div><!-- /.page-content -->
        </div><!-- /.main-content -->
    </div><!-- /.main-container -->
</body>
<#include "../include/resource-script.ftl"/>
</html>

